package com.hytc.mymall.utils;

import java.io.File;
import java.net.URL;

public class FileDownloadThread
  extends Thread
{
  private static final String TAG = FileDownloadThread.class.getSimpleName();
  private int blockSize;
  private int downloadLength = 0;
  private URL downloadUrl;
  private File file;
  private boolean isCompleted = false;
  private int threadId;
  
  public FileDownloadThread(URL paramURL, File paramFile, int paramInt1, int paramInt2)
  {
    this.downloadUrl = paramURL;
    this.file = paramFile;
    this.threadId = paramInt2;
    this.blockSize = paramInt1;
  }
  
  public int getDownloadLength()
  {
    return this.downloadLength;
  }
  
  public boolean isCompleted()
  {
    return this.isCompleted;
  }
  
  /* Error */
  public void run()
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_1
    //   2: aconst_null
    //   3: astore_2
    //   4: aload_0
    //   5: getfield 36	com/sz/ydgy/utils/FileDownloadThread:downloadUrl	Ljava/net/URL;
    //   8: invokevirtual 54	java/net/URL:openConnection	()Ljava/net/URLConnection;
    //   11: astore 9
    //   13: aload 9
    //   15: iconst_1
    //   16: invokevirtual 60	java/net/URLConnection:setAllowUserInteraction	(Z)V
    //   19: aload_0
    //   20: getfield 42	com/sz/ydgy/utils/FileDownloadThread:blockSize	I
    //   23: iconst_m1
    //   24: aload_0
    //   25: getfield 40	com/sz/ydgy/utils/FileDownloadThread:threadId	I
    //   28: iadd
    //   29: imul
    //   30: istore 10
    //   32: iconst_m1
    //   33: aload_0
    //   34: getfield 42	com/sz/ydgy/utils/FileDownloadThread:blockSize	I
    //   37: aload_0
    //   38: getfield 40	com/sz/ydgy/utils/FileDownloadThread:threadId	I
    //   41: imul
    //   42: iadd
    //   43: istore 11
    //   45: aload 9
    //   47: ldc 62
    //   49: new 64	java/lang/StringBuilder
    //   52: dup
    //   53: ldc 66
    //   55: invokespecial 69	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   58: iload 10
    //   60: invokevirtual 73	java/lang/StringBuilder:append	(I)Ljava/lang/StringBuilder;
    //   63: ldc 75
    //   65: invokevirtual 78	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   68: iload 11
    //   70: invokevirtual 73	java/lang/StringBuilder:append	(I)Ljava/lang/StringBuilder;
    //   73: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   76: invokevirtual 85	java/net/URLConnection:setRequestProperty	(Ljava/lang/String;Ljava/lang/String;)V
    //   79: getstatic 91	java/lang/System:out	Ljava/io/PrintStream;
    //   82: new 64	java/lang/StringBuilder
    //   85: dup
    //   86: invokestatic 95	java/lang/Thread:currentThread	()Ljava/lang/Thread;
    //   89: invokevirtual 98	java/lang/Thread:getName	()Ljava/lang/String;
    //   92: invokestatic 104	java/lang/String:valueOf	(Ljava/lang/Object;)Ljava/lang/String;
    //   95: invokespecial 69	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   98: ldc 106
    //   100: invokevirtual 78	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   103: iload 10
    //   105: invokevirtual 73	java/lang/StringBuilder:append	(I)Ljava/lang/StringBuilder;
    //   108: ldc 75
    //   110: invokevirtual 78	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   113: iload 11
    //   115: invokevirtual 73	java/lang/StringBuilder:append	(I)Ljava/lang/StringBuilder;
    //   118: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   121: invokevirtual 111	java/io/PrintStream:println	(Ljava/lang/String;)V
    //   124: sipush 1024
    //   127: newarray byte
    //   129: astore 12
    //   131: new 113	java/io/BufferedInputStream
    //   134: dup
    //   135: aload 9
    //   137: invokevirtual 117	java/net/URLConnection:getInputStream	()Ljava/io/InputStream;
    //   140: invokespecial 120	java/io/BufferedInputStream:<init>	(Ljava/io/InputStream;)V
    //   143: astore 13
    //   145: new 122	java/io/RandomAccessFile
    //   148: dup
    //   149: aload_0
    //   150: getfield 38	com/sz/ydgy/utils/FileDownloadThread:file	Ljava/io/File;
    //   153: ldc 124
    //   155: invokespecial 127	java/io/RandomAccessFile:<init>	(Ljava/io/File;Ljava/lang/String;)V
    //   158: astore 14
    //   160: iload 10
    //   162: i2l
    //   163: lstore 15
    //   165: aload 14
    //   167: lload 15
    //   169: invokevirtual 131	java/io/RandomAccessFile:seek	(J)V
    //   172: aload 13
    //   174: aload 12
    //   176: iconst_0
    //   177: sipush 1024
    //   180: invokevirtual 135	java/io/BufferedInputStream:read	([BII)I
    //   183: istore 17
    //   185: iload 17
    //   187: iconst_m1
    //   188: if_icmpne +55 -> 243
    //   191: aload_0
    //   192: iconst_1
    //   193: putfield 32	com/sz/ydgy/utils/FileDownloadThread:isCompleted	Z
    //   196: getstatic 26	com/sz/ydgy/utils/FileDownloadThread:TAG	Ljava/lang/String;
    //   199: new 64	java/lang/StringBuilder
    //   202: dup
    //   203: ldc 137
    //   205: invokespecial 69	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   208: aload_0
    //   209: getfield 34	com/sz/ydgy/utils/FileDownloadThread:downloadLength	I
    //   212: invokevirtual 73	java/lang/StringBuilder:append	(I)Ljava/lang/StringBuilder;
    //   215: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   218: invokestatic 143	android/util/Log:d	(Ljava/lang/String;Ljava/lang/String;)I
    //   221: pop
    //   222: aload 13
    //   224: ifnull +8 -> 232
    //   227: aload 13
    //   229: invokevirtual 146	java/io/BufferedInputStream:close	()V
    //   232: aload 14
    //   234: ifnull +137 -> 371
    //   237: aload 14
    //   239: invokevirtual 147	java/io/RandomAccessFile:close	()V
    //   242: return
    //   243: aload 14
    //   245: aload 12
    //   247: iconst_0
    //   248: iload 17
    //   250: invokevirtual 151	java/io/RandomAccessFile:write	([BII)V
    //   253: aload_0
    //   254: iload 17
    //   256: aload_0
    //   257: getfield 34	com/sz/ydgy/utils/FileDownloadThread:downloadLength	I
    //   260: iadd
    //   261: putfield 34	com/sz/ydgy/utils/FileDownloadThread:downloadLength	I
    //   264: goto -92 -> 172
    //   267: astore_3
    //   268: aload 14
    //   270: astore_2
    //   271: aload 13
    //   273: astore_1
    //   274: aload_3
    //   275: invokevirtual 154	java/io/IOException:printStackTrace	()V
    //   278: aload_1
    //   279: ifnull +7 -> 286
    //   282: aload_1
    //   283: invokevirtual 146	java/io/BufferedInputStream:close	()V
    //   286: aload_2
    //   287: ifnull -45 -> 242
    //   290: aload_2
    //   291: invokevirtual 147	java/io/RandomAccessFile:close	()V
    //   294: return
    //   295: astore 7
    //   297: aload 7
    //   299: invokevirtual 154	java/io/IOException:printStackTrace	()V
    //   302: return
    //   303: astore 8
    //   305: aload 8
    //   307: invokevirtual 154	java/io/IOException:printStackTrace	()V
    //   310: goto -24 -> 286
    //   313: astore 4
    //   315: aload_1
    //   316: ifnull +7 -> 323
    //   319: aload_1
    //   320: invokevirtual 146	java/io/BufferedInputStream:close	()V
    //   323: aload_2
    //   324: ifnull +7 -> 331
    //   327: aload_2
    //   328: invokevirtual 147	java/io/RandomAccessFile:close	()V
    //   331: aload 4
    //   333: athrow
    //   334: astore 6
    //   336: aload 6
    //   338: invokevirtual 154	java/io/IOException:printStackTrace	()V
    //   341: goto -18 -> 323
    //   344: astore 5
    //   346: aload 5
    //   348: invokevirtual 154	java/io/IOException:printStackTrace	()V
    //   351: goto -20 -> 331
    //   354: astore 20
    //   356: aload 20
    //   358: invokevirtual 154	java/io/IOException:printStackTrace	()V
    //   361: goto -129 -> 232
    //   364: astore 19
    //   366: aload 19
    //   368: invokevirtual 154	java/io/IOException:printStackTrace	()V
    //   371: return
    //   372: astore 4
    //   374: aload 13
    //   376: astore_1
    //   377: aconst_null
    //   378: astore_2
    //   379: goto -64 -> 315
    //   382: astore 4
    //   384: aload 14
    //   386: astore_2
    //   387: aload 13
    //   389: astore_1
    //   390: goto -75 -> 315
    //   393: astore_3
    //   394: aconst_null
    //   395: astore_1
    //   396: aconst_null
    //   397: astore_2
    //   398: goto -124 -> 274
    //   401: astore_3
    //   402: aload 13
    //   404: astore_1
    //   405: aconst_null
    //   406: astore_2
    //   407: goto -133 -> 274
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	410	0	this	FileDownloadThread
    //   1	404	1	localObject1	java.lang.Object
    //   3	404	2	localObject2	java.lang.Object
    //   267	8	3	localIOException1	java.io.IOException
    //   393	1	3	localIOException2	java.io.IOException
    //   401	1	3	localIOException3	java.io.IOException
    //   313	19	4	localObject3	java.lang.Object
    //   372	1	4	localObject4	java.lang.Object
    //   382	1	4	localObject5	java.lang.Object
    //   344	3	5	localIOException4	java.io.IOException
    //   334	3	6	localIOException5	java.io.IOException
    //   295	3	7	localIOException6	java.io.IOException
    //   303	3	8	localIOException7	java.io.IOException
    //   11	125	9	localURLConnection	java.net.URLConnection
    //   30	131	10	i	int
    //   43	71	11	j	int
    //   129	117	12	arrayOfByte	byte[]
    //   143	260	13	localBufferedInputStream	java.io.BufferedInputStream
    //   158	227	14	localRandomAccessFile	java.io.RandomAccessFile
    //   163	5	15	l	long
    //   183	78	17	k	int
    //   364	3	19	localIOException8	java.io.IOException
    //   354	3	20	localIOException9	java.io.IOException
    // Exception table:
    //   from	to	target	type
    //   165	172	267	java/io/IOException
    //   172	185	267	java/io/IOException
    //   191	222	267	java/io/IOException
    //   243	264	267	java/io/IOException
    //   290	294	295	java/io/IOException
    //   282	286	303	java/io/IOException
    //   4	145	313	finally
    //   274	278	313	finally
    //   319	323	334	java/io/IOException
    //   327	331	344	java/io/IOException
    //   227	232	354	java/io/IOException
    //   237	242	364	java/io/IOException
    //   145	160	372	finally
    //   165	172	382	finally
    //   172	185	382	finally
    //   191	222	382	finally
    //   243	264	382	finally
    //   4	145	393	java/io/IOException
    //   145	160	401	java/io/IOException
  }
}



/* Location:           C:\Users\Joker\Desktop\classes_dex2jar.jar

 * Qualified Name:     com.sz.ydgy.utils.FileDownloadThread

 * JD-Core Version:    0.7.0.1

 */